﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     xmlns:services="clr-namespace:paravili.Services;assembly=paravili"
                    xmlns:captureSources="clr-namespace:paravili.CaptureSources;assembly=paravili"
                    xmlns:steps="clr-namespace:paravili.Steps;assembly=paravili"
      xmlns:profiles="clr-namespace:Sebarf.Profiles.WPF;assembly=Sebarf.Profiles.WPF" >

    <profiles:ProfileConfiguration x:Key="MotionByDiffColors" 
                                    ProfileName="MotionByDiffColors">
        <profiles:ProfileConfiguration.Services>
            <services:TimeService/>
            <services:ImageProviderLocatorService/>
            <services:CaptureSourcesLocatorService>
                <services:CaptureSourcesLocatorService.CaptureSources>
                    <captureSources:ImagesFromDiskAsCaptureSource Name="Circle, noise: lights" DictionaryImagesPath="..\..\..\..\..\..\099_Materials\Easy\MovingCircleWithLight"/>
                    <captureSources:ImagesFromDiskAsCaptureSource Name="Circle" DictionaryImagesPath="..\..\..\..\..\..\099_Materials\Easy\MovingCircle"/>
                    <captureSources:ImagesFromDiskAsCaptureSource Name="Circle, large" ScaleFactor="1" DictionaryImagesPath="..\..\..\..\..\..\099_Materials\Easy\MovingCircle"/>
                    <captureSources:ImagesFromDiskAsCaptureSource Name="Big City Beats Summer Club" ScaleFactor="1" DictionaryImagesPath="..\..\..\..\..\..\099_Materials\Middle"/>
                    <captureSources:ImagesFromDiskAsCaptureSource Name="Big City Beats Summer Club, Large" ScaleFactor="0" DictionaryImagesPath="..\..\..\..\..\..\099_Materials\Middle"/>
                    <captureSources:ImagesFromDiskAsCaptureSource Name="Big City Beats Summer Club, HappyPeople" ScaleFactor="0" DictionaryImagesPath="..\..\..\..\..\..\099_Materials\Middle\HappyPeople"/>
                    <captureSources:ImagesFromDiskAsCaptureSource Name="Big City Beats Summer Club, Not HappyPeople" ScaleFactor="0" DictionaryImagesPath="..\..\..\..\..\..\099_Materials\Middle\NotHappy"/>
                    <captureSources:ImagesFromDiskAsCaptureSource Name="Big City Beats Summer Club, Not happy to happy people" ScaleFactor="0" DictionaryImagesPath="..\..\..\..\..\..\099_Materials\Middle\NotHappyToHappy"/>
                    <captureSources:WebCamBasedCaptureSource/>
                    <captureSources:RawVideoBasedCaptureSource Name="VinDiesel"  ScaleFactor="1" VideoPath="..\..\..\..\..\..\099_Materials\Middle\xxx.avi"/>
                    <captureSources:OnTheFlyGeneratedImagesAsCaptureSource Name="circles, low velocity" MinVelocity="0" MaxVelocity="5">
                        <captureSources:OnTheFlyGeneratedImagesAsCaptureSource.Generator>
                            <captureSources:CircleGenerator MaxCircles="20" MinCircles="5" RandomizeColour="True"/>
                        </captureSources:OnTheFlyGeneratedImagesAsCaptureSource.Generator>
                    </captureSources:OnTheFlyGeneratedImagesAsCaptureSource>
                    <captureSources:OnTheFlyGeneratedImagesAsCaptureSource Name="circles, middle velocity" MinVelocity="0" MaxVelocity="15">
                        <captureSources:OnTheFlyGeneratedImagesAsCaptureSource.Generator>
                            <captureSources:CircleGenerator MaxCircles="20" MinCircles="5" RandomizeColour="True"/>
                        </captureSources:OnTheFlyGeneratedImagesAsCaptureSource.Generator>
                    </captureSources:OnTheFlyGeneratedImagesAsCaptureSource>
                    <captureSources:OnTheFlyGeneratedImagesAsCaptureSource Name="circles, high velocity" MinVelocity="0" MaxVelocity="25">
                        <captureSources:OnTheFlyGeneratedImagesAsCaptureSource.Generator>
                            <captureSources:CircleGenerator MaxCircles="20" MinCircles="5" RandomizeColour="True"/>
                        </captureSources:OnTheFlyGeneratedImagesAsCaptureSource.Generator>
                    </captureSources:OnTheFlyGeneratedImagesAsCaptureSource>
                    <captureSources:OnTheFlyGeneratedImagesAsCaptureSource Name="circles, atpoint" UseGenerator="False" MinVelocity="0" MaxVelocity="25">
                        <captureSources:OnTheFlyGeneratedImagesAsCaptureSource.MovingElements>
                            <captureSources:DeterministicCircle Behavior="InverseOffset" XOffset="5" Radius="5" Point="10,10"/>
                            <captureSources:DeterministicCircle Behavior="InverseOffset" XOffset="5" Radius="5" Point="10,120"/>
                            <captureSources:DeterministicCircle Behavior="InverseOffset" XOffset="5" Radius="5" Point="10,170"/>

                            <captureSources:DeterministicNervousCircleHorizontal  XOffset="5" Radius="10" Speed="5" Distance="10"  Point="50,50"/>
                            <captureSources:DeterministicNervousCircleHorizontal  XOffset="5" Radius="10" Speed="1" Distance="30" Point="100,75"/>
                            <captureSources:DeterministicNervousCircleHorizontal  XOffset="5" Radius="10" Speed="3" Distance="50" Point="100,100"/>
                            <captureSources:DeterministicNervousCircleHorizontal  XOffset="5" Radius="10" Speed="2" Distance="15" Point="100,150"/>
                            <captureSources:DeterministicNervousCircleHorizontal  XOffset="5" Radius="10" Speed="4" Distance="40"  Point="100,200"/>
                        </captureSources:OnTheFlyGeneratedImagesAsCaptureSource.MovingElements>
                    </captureSources:OnTheFlyGeneratedImagesAsCaptureSource>
                    <captureSources:OnTheFlyGeneratedImagesAsCaptureSource Name="circles, moving left to right and back" UseGenerator="False" MinVelocity="0" MaxVelocity="25">
                        <captureSources:OnTheFlyGeneratedImagesAsCaptureSource.MovingElements>
                            <captureSources:DeterministicCircle Behavior="InverseOffset" XOffset="5" Radius="5" Point="10,10"/>
                            <captureSources:DeterministicCircle Behavior="InverseOffset" XOffset="5" Radius="5" Point="10,50"/>
                            <captureSources:DeterministicCircle Behavior="InverseOffset" XOffset="5" Radius="5" Point="10,100"/>
                            <captureSources:DeterministicCircle Behavior="InverseOffset" XOffset="5" Radius="5" Point="10,150"/>
                            <captureSources:DeterministicCircle Behavior="InverseOffset" XOffset="5" Radius="5" Point="10,200"/>                           
                        </captureSources:OnTheFlyGeneratedImagesAsCaptureSource.MovingElements>
                    </captureSources:OnTheFlyGeneratedImagesAsCaptureSource>
                    <captureSources:OnTheFlyGeneratedImagesAsCaptureSource Name="circles, moving left to top and bottom" UseGenerator="False" MinVelocity="0" MaxVelocity="25">
                        <captureSources:OnTheFlyGeneratedImagesAsCaptureSource.MovingElements>
                            <captureSources:DeterministicCircle Behavior="InverseOffset" YOffset="5" Radius="5" Point="10,10"/>
                            <captureSources:DeterministicCircle Behavior="InverseOffset" YOffset="5" Radius="5" Point="50,10"/>
                            <captureSources:DeterministicCircle Behavior="InverseOffset" YOffset="5" Radius="5" Point="100,10"/>
                            <captureSources:DeterministicCircle Behavior="InverseOffset" YOffset="5" Radius="5" Point="150,10"/>
                            <captureSources:DeterministicCircle Behavior="InverseOffset" YOffset="5" Radius="5" Point="200,10"/>
                            <captureSources:DeterministicCircle Behavior="InverseOffset" YOffset="5" Radius="5" Point="250,10"/>
                            <captureSources:DeterministicCircle Behavior="InverseOffset" YOffset="5" Radius="5" Point="300,10"/>
                        </captureSources:OnTheFlyGeneratedImagesAsCaptureSource.MovingElements>
                    </captureSources:OnTheFlyGeneratedImagesAsCaptureSource>
                    <captureSources:OnTheFlyGeneratedImagesAsCaptureSource Name="circles, moving left,top" UseGenerator="False" MinVelocity="0" MaxVelocity="25">
                        <captureSources:OnTheFlyGeneratedImagesAsCaptureSource.MovingElements>
                            <captureSources:DeterministicCircle Behavior="InverseOffset" YOffset="5" XOffset="5" Radius="5" Point="10,10"/>
                            <captureSources:DeterministicCircle Behavior="InverseOffset" YOffset="5" XOffset="5" Radius="5" Point="50,10"/>
                            <captureSources:DeterministicCircle Behavior="InverseOffset" YOffset="5" XOffset="5" Radius="5" Point="100,10"/>
                            <captureSources:DeterministicCircle Behavior="InverseOffset" YOffset="5" XOffset="5" Radius="5" Point="150,10"/>
                            <captureSources:DeterministicCircle Behavior="InverseOffset" YOffset="5" XOffset="5" Radius="5" Point="200,10"/>
                            <captureSources:DeterministicCircle Behavior="InverseOffset" YOffset="5" XOffset="5" Radius="5" Point="250,10"/>
                            <captureSources:DeterministicCircle Behavior="InverseOffset" YOffset="5" XOffset="5" Radius="5" Point="300,10"/>
                        </captureSources:OnTheFlyGeneratedImagesAsCaptureSource.MovingElements>
                    </captureSources:OnTheFlyGeneratedImagesAsCaptureSource>
                </services:CaptureSourcesLocatorService.CaptureSources>
            </services:CaptureSourcesLocatorService>
            <services:ResetHandlerService/>
            <services:StatisticValuesLocatorProviderService/>
            <services:DoMatchingByPrimAlgorithmService/>
            <services:CurrentImageInformationService/>
            <services:CurrentCaptureSourceInformationService/>
            <services:ImageValidRegionProvider/>
        </profiles:ProfileConfiguration.Services>
        <profiles:ProfileConfiguration.Processes>
            <steps:NextImageProvider DoSynchronize="False">
                <steps:ThrowEqualImagesAway>
                    <steps:AvoidExtremRGBValues>
                        <steps:SmoothMedian>
                            <steps:SmoothGaussian>
                                <steps:LaplacianFilter>
                                    <steps:HistogramEqualizer>
                                        <steps:HistogramEqualizer2>
                                            <steps:AvoidExtremRGBValues>
                                                <steps:BgrToLabConverter>
                                                    
                                                        
                                                            <steps:ManuallyCropDeadRegions>
                                                                <steps:ManuallyCropDeadRegions.DeadRegionsByCaptureSource>
                                                                    <steps:RegionFilterDataByCaptureSource CaptureSourceName="Big City Beats Summer Club, HappyPeople" PointsLists="0,0;340,0;340,60;0,60;\160,0;230,0;230,240;160,240;"/>
                                                                    <steps:RegionFilterDataByCaptureSource CaptureSourceName="Big City Beats Summer Club, Not HappyPeople" PointsLists="0,0;340,0;340,60;0,60;\210,0;250,0;250,240;210,240;"/>
                                                                    <steps:RegionFilterDataByCaptureSource CaptureSourceName="Big City Beats Summer Club, Not happy to happy people" PointsLists="0,0;340,0;340,60;0,60;\210,0;250,0;250,240;210,240;"/>
                                                                </steps:ManuallyCropDeadRegions.DeadRegionsByCaptureSource>
                                                                <steps:FindDifferencesBetweenImages>
                                                                    <steps:FindClustersByDENCLUEMethod>
                                                                        
                                                                            <steps:FindMovementBetweenClustersByUsingService>
                                                                                <steps:GroupClusterIntoRegionsOfActivity>
                                                                                    <steps:CollectMovementOverTime>
                                                                                        <steps:VisualizeMovementAtImage>
                                                                                            <steps:AnalyseMovement>
                                                                                                <steps:MovementToObjectConverter>
                                                                                                    <steps:StoreImageToDisk>
                                                                                                        <steps:IncreaseApplicationTime>
                                                                                                            <steps:NotifyImageDataDisplayer>
                                                                                                                <steps:CalculateMovingAverageOfStatisticValue StatisticValueField="Movement@Other" StatisticValueOutputField="Movement@Other.Average" NumbersOfMeasureForTheAverage="5">
                                                                                                                    <steps:ConditionEvaluater StatisticValueField="Movement@Other.Average" StatisticValueOutputField="Emotion">
                                                                                                                        <steps:ConditionEvaluater.Condition1>
                                                                                                                            <![CDATA[value < 20 --> Bad]]>
                                                                                                                        </steps:ConditionEvaluater.Condition1>
                                                                                                                        <steps:ConditionEvaluater.Condition2>
                                                                                                                            <![CDATA[value < 30 --> Normal]]>
                                                                                                                        </steps:ConditionEvaluater.Condition2>
                                                                                                                        <steps:ConditionEvaluater.Condition3>
                                                                                                                            <![CDATA[value < 50 --> Good]]>
                                                                                                                        </steps:ConditionEvaluater.Condition3>
                                                                                                                        <steps:FrameNumberVisualizer>
                                                                                                                            <steps:FrameNumberToTimeConverter>
                                                                                                                                <steps:StoreStatisticDataToDisk IsEnable="True"/>
                                                                                                                            </steps:FrameNumberToTimeConverter>
                                                                                                                        </steps:FrameNumberVisualizer>
                                                                                                                    </steps:ConditionEvaluater>
                                                                                                                </steps:CalculateMovingAverageOfStatisticValue>
                                                                                                            </steps:NotifyImageDataDisplayer>
                                                                                                        </steps:IncreaseApplicationTime>
                                                                                                    </steps:StoreImageToDisk>
                                                                                                </steps:MovementToObjectConverter>
                                                                                            </steps:AnalyseMovement>
                                                                                        </steps:VisualizeMovementAtImage>
                                                                                    </steps:CollectMovementOverTime>
                                                                                </steps:GroupClusterIntoRegionsOfActivity>
                                                                            </steps:FindMovementBetweenClustersByUsingService>
                                                                        
                                                                    </steps:FindClustersByDENCLUEMethod>
                                                                </steps:FindDifferencesBetweenImages>
                                                            </steps:ManuallyCropDeadRegions>
                                                        
                                                    
                                                </steps:BgrToLabConverter>
                                            </steps:AvoidExtremRGBValues>
                                        </steps:HistogramEqualizer2>
                                    </steps:HistogramEqualizer>
                                </steps:LaplacianFilter>
                            </steps:SmoothGaussian>
                        </steps:SmoothMedian>
                    </steps:AvoidExtremRGBValues>
                </steps:ThrowEqualImagesAway>
            </steps:NextImageProvider>
        </profiles:ProfileConfiguration.Processes>
    </profiles:ProfileConfiguration>

</ResourceDictionary>
